module sdldee.events;

enum AppState {
	APPMOUSEFOCUS = 0x01, /// The application has mouse coverage
	APPINPUTFOCUS = 0x02, /// The application has input focus
	APPACTIVE = 0x04 /// The application is active
}

enum InputState {
	RELEASED = 0,
	PRESSED = 1
}

enum EventType {
	NOEVENT = 0, /// Unused (do not remove)
	ACTIVEEVENT, /// Application loses/gains visibility
	KEYDOWN, /// Keys pressed
	KEYUP, /// Keys released
	MOUSEMOTION, /// Mouse moved
	MOUSEBUTTONDOWN, /// Mouse button pressed
	MOUSEBUTTONUP, /// Mouse button released
	JOYAXISMOTION, /// Joystick axis motion
	JOYBALLMOTION, /// Joystick trackball motion
	JOYHATMOTION, /// Joystick hat position change
	JOYBUTTONDOWN, /// Joystick button pressed
	JOYBUTTONUP, /// Joystick button released
	QUIT, /// User-requested quit
	SYSWMEVENT, /// System specific event
	EVENT_RESERVEDA, /// Reserved for future use..
	EVENT_RESERVEDB, /// Reserved for future use..
	VIDEORESIZE, /// User resized video mode
	VIDEOEXPOSE, /// Screen needs to be redrawn
	EVENT_RESERVED2, /// Reserved for future use..
	EVENT_RESERVED3, /// Reserved for future use..
	EVENT_RESERVED4, /// Reserved for future use..
	EVENT_RESERVED5, /// Reserved for future use..
	EVENT_RESERVED6, /// Reserved for future use..
	EVENT_RESERVED7, /// Reserved for future use..
	USEREVENT = 24, /// Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use
	NUMEVENTS = 32 /// This last event is only for bounding internal arrays
}

enum EventMask {
	ACTIVEEVENT	= 1 << EventType.ACTIVEEVENT,
	KEYDOWN =  1 << EventType.KEYDOWN,
	KEYUP	= 1 << EventType.KEYUP,
	KEYEVENT = 1 << EventType.KEYDOWN | 1 << EventType.KEYUP,
	MOUSEMOTION = 1 << EventType.MOUSEMOTION,
	MOUSEBUTTONDOWN = 1 << EventType.MOUSEBUTTONDOWN,
	MOUSEBUTTONUP = 1 << EventType.MOUSEBUTTONUP,
	MOUSEEVENT = 1 << EventType.MOUSEMOTION | 1 << EventType.MOUSEBUTTONDOWN | 1 << EventType.MOUSEBUTTONUP,
	JOYAXISMOTION = 1 << EventType.JOYAXISMOTION,
	JOYBALLMOTION = 1 << EventType.JOYBALLMOTION,
	JOYHATMOTION = 1 << EventType.JOYHATMOTION,
	JOYBUTTONDOWN = 1 << EventType.JOYBUTTONDOWN,
	JOYBUTTONUP = 1 << EventType.JOYBUTTONUP,
	JOYEVENT = 1 << EventType.JOYAXISMOTION | 1 << EventType.JOYBALLMOTION | 1 << EventType.JOYHATMOTION | 1 << EventType.JOYBUTTONDOWN | 1 << EventType.JOYBUTTONUP,
	VIDEORESIZE =  1 << EventType.VIDEORESIZE,
	VIDEOEXPOSE = 1 << EventType.VIDEOEXPOSE,
	QUIT = 1 << EventType.QUIT,
	SYSWMEVENT = 1 << EventType.SYSWMEVENT,
}

const int ALLEVENTS = 0xFFFFFFFF;

enum EventState {
	QUERY = -1,
	IGNORE = 0,
	DISABLE	= 0,
	ENABLE = 1
}
